﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BinaryTree
{
    public class VAmountOfLeaves:IVisit
    {
        private  int l = 0;
        public int Amount { get { return l; } }
        public void Visit(treeNode _root)
        {
            if (_root == null)
            {
                l += 0;
            }
            else
            {
                if (_root.left == null && _root.right == null)
                {
                    l += 1;
                }
            }
        }
    }
}
